<template>
	<div class="clewFive">
		<div class="clew-title">{{conpanyName}}</div>
		<div class="clew-main">
			<ul>
				<li>
					<div class="item-message">{{economicCode}}</div>
					<span>国民经济代码名称</span>
				</li>
				<li>
					<div class="item-message">{{conpanyAddress}}</div>
					<span>企业地址</span>
				</li>
				<li>
					<div class="item-message">{{creditCode}}</div>
					<span>统一信用代码</span>
				</li>
				<li>
					<div class="item-message">{{operationEnd}}</div>
					<span>经营期限至</span>
				</li>
				<li>
					<div class="item-message">{{operationStart}}</div>
					<span>经营期限自</span>
				</li>
				<li>
					<div class="item-message">{{registeredCapital}}</div>
					<span>注册资本</span>
				</li>
				<li>
					<div class="item-message">{{registerDate}}</div>
					<span>成立日期</span>
				</li>
				<li>
					<div class="item-message">{{legalRepresentative}}</div>
					<span>法定代表人</span>
				</li>
				<li>
					<div class="item-message">{{managementForms}}</div>
					<span>经营状态</span>
				</li>
				<li>
					<div class="item-message">{{enterpriseType}}</div>
					<span>企业类型</span>
				</li>
				<li>
					<div class="item-message">{{province}}</div>
					<span>所在省份</span>
				</li>
				<li>
					<div class="item-message">{{city}}</div>
					<span>所在城市</span>
				</li>
				<li>
					<div class="item-message">{{county}}</div>
					<span>所在区/县</span>
				</li>
				<li>
					<div class="item-message">{{peopleNum}}人</div>
					<span>员工人数</span>
				</li>
				<li>
					<div class="item-message">{{businessScope}}</div>
					<span>经营业务范围</span>
				</li>
			</ul>
			<div class="clew-btn">
				<a-button type="primary" v-if="isAdd" @click="handleAdd">
					添加为跟进客户
				</a-button>
				<a-button type="primary" v-else @click="handleView">
					查看跟进详情
				</a-button>
			</div>
		</div>
	</div>
</template>

<script>
	export default {
		name: 'clew-five',
		props: ['showComponent'],
		data () {
			return {
				isAdd: true,
				conpanyName: '江西素柏木业有限公司',
				economicCode: '3412',
				conpanyAddress: '江西省抚州市高新区南山街道南山大道56号',
				creditCode: '3412453690987874k',
				operationStart: '2010.10.10',
				operationEnd: '2019.09.09',
				registeredCapital: '5000万',
				registerDate: '2010.01.10',
				legalRepresentative: '张三',
				managementForms: '盈利',
				enterpriseType: '私营企业',
				province: '江西省',
				city: '抚州市',
				county: '高新区',
				peopleNum: '1,234',
				businessScope: '经营业务范围'
			}
		},
		methods: {
			handleAdd () {
				this.isAdd = false
				this.$emit('update:showComponent', 'SearchResult')
			},
			handleView () {
				console.log('查看跟进详情')
				this.$emit('update:showComponent', 'SearchResult')
			}
		}
	}
</script>

<style lang="less" scoped>
	.clewFive {
		margin: 20px 0 0 20px;
		height: 100%;
		padding-top: 60px;
		background: @whiteBg;
		.clew-title {
			text-align: center;
			font-weight: bold;
			font-size: @font28;
			margin-bottom: 60px;
		}

		.clew-main {
			ul {
				width: 100%;
				display: flex;
				justify-content: flex-start;
				align-items: center;
				flex-wrap: wrap;
				margin-bottom: 40px;

				li {
					width: 25%;
					text-align: center;
					margin-bottom: 30px;

					.item-message {
						font-weight: bold;
						font-size: @font24;
						overflow: hidden;
						text-overflow: ellipsis;
						white-space: nowrap;
					}

					span {
						font-size: @font20;
					}
				}
			}

			.clew-btn {
				text-align: center;
			}
		}
	}
</style>
